package collection;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<String>arrayList = new ArrayList<>();
        arrayList.add("a");
        arrayList.add("b");
        ArrayList<String>arrayList2 = new ArrayList<>();
        arrayList.add("c");
        arrayList.add("d");
        arrayList.addAll(1,arrayList2);
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.print(arrayList.get(i)+" ") ;
        }
    }


}
